﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8" />
	<title>易买网 - 首页</title>
	<link type="text/css" rel="stylesheet" th:href="@{/css/style.css}" href="css/style.css" />
	<script type="text/javascript" th:src="@{/scripts/function.js}" src="scripts/function.js"></script>
</head>
<body>
<div id="header" class="wrap">
	<div id="logo"><img th:src="@{/images/logo.gif}" src="images/logo.gif" /></div>
	<div class="help">
		<marquee behavior="alternate" style="color:orange;font-size:16px;" th:if="${session.lgnUserName !=null}" th:text="${session.lgnUserName}+'&nbsp;&nbsp;欢迎你'"></marquee>
		<a href="#" class="shopping">购物车</a>
		<a  th:href="@{/login/to_login}" href="login.html">登录</a>
		<a th:href="@{/login/to_register}">注册</a>
		<a href="guestbook.html">留言</a>
		<a th:if="${session.lgnUserName !=null}" th:text="退出" th:href="@{/login/logout}">退出</a>
	</div>
	<div class="navbar">
		<ul class="clearfix">
			<li class="current"><a href="#">首页</a></li>
			<li><a href="#">图书</a></li>
			<li><a href="#">百货</a></li>
			<li><a href="#">品牌</a></li>
			<li><a href="#">促销</a></li>
		</ul>
	</div>
</div>
<div id="childNav">
	<div class="wrap">
		<ul class="clearfix">
			<li class="first"><a href="#">音乐</a></li>
			<li><a href="#">影视</a></li>
			<li><a href="#">少儿</a></li>
			<li><a href="#">动漫</a></li>
			<li><a href="#">小说</a></li>
			<li><a href="#">外语</a></li>
			<li><a href="#">数码相机</a></li>
			<li><a href="#">笔记本</a></li>
			<li class="last"><a href="#">Investor Relations</a></li>
		</ul>
	</div>
</div>
<div id="main" class="wrap">
	<div class="lefter">
		<div class="box">
			<h2>商品分类</h2>
			<dl>
				<span th:each="big : ${categoryMap['big']}">
				<dt th:text="${big.epcName}">图书音像</dt>
				<dd th:each="small : ${categoryMap['small']}">
					<a  th:if="${big.epcId == small.epcParentId}" th:href="@{/product/cate_product_list/{smallId}(smallId=${small.epcId})}" href="product-list.html"
						th:text="${small.epcName}">图书</a></dd>
				</span>
			</dl>
		</div>
		<div class="spacer"></div>
		<div class="last-view">
			<h2>最近浏览</h2>
			<dl class="clearfix">
				<dt><img src="images/product/0_tiny.gif" /></dt>
				<dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd>
				<dt><img src="images/product/0_tiny.gif" /></dt>
				<dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd>
			</dl>
		</div>
	</div>
	<div class="main">

		<div style="padding-left: 50px;">
			<form th:action="@{/product/search}" method="post">
				<table>
					<tr>
						<th>
							<input type="search" name="searchText" th:value="${searchText}"
								   style="height: 29px;width: 300px;font-size: 16px;text-indent: 7px;"/>
						</th>
						<th>
							<input type="submit" value="查询"
								   style="margin-left: 5px;border:1px #fc7e31 solid;height: 29px;width: 100px;background: #fc7e31;color: white;font-size: 18px;"/>
						</th>
					</tr>
				</table>
			</form>
		</div>
		<div class="price-off">
			<h2>商品列表</h2>
			<ul class="product clearfix">


				<li th:each="prod : ${ebProductList}">
					<dl>
						<dt><a th:href="@{/product/detail(epId=${prod.epId})}" href="product-view.html" target="_blank">
							<img th:src="@{'/images/product/'+${prod.epFileName}}" src="images/product/"+${prod.epFileName} /></a></dt>
						<dd class="title"><a  th:href="@{/product/detail(epId=${prod.epId})}" href="product-view.html" target="_blank" th:text="${prod.epName}"></a></dd>
						<dd class="price" th:text="'￥'+${prod.epPrice}">￥</dd>
					</dl>
				</li>

			</ul>

			<div class="pager">

				<ul class="clearfix">
					<li><a th:if="${curPage!=1}" th:href="@{/front/index(pSize=${curPage-1})}">上一页</a></li>
					<li  th:each="num : ${#numbers.sequence(1,maxPage)}"
					>
						<a th:class="${curPage==num?'current':''}" th:href="@{/front/index(pSize=${num})}" th:text="${num}"></a>
					</li>

					<li><a href="#"
						   th:if="${ebProductPage.hasNext()}"
						   th:href="@{/front/index(pSize=${curPage+1})}">
						下一页</a></li>

					<li th:text="'共'+${maxPage}+'页'"></li>
				</ul>
			</div>

		</div>
		<div class="side">
			<div class="spacer"></div>
			<div class="news-list">
				<h4>新闻动态</h4>
				<ul>
					<li th:each="news : ${ebNewsList}">

						<a th:href="@{/news/detail(enId=${news.enId})}" href="news-view.html" target="_blank"
						   th:text="${news.enTitle}">抢钱啦</a>
						<!--						<a href="news-view.html" target="_blank" th:text="${news.enTitle}">抢钱啦</a>-->
					</li>

				</ul>

			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2016 湖南软测信息技术有限公司 All Rights Reserved. 湘ICP证1001号
</div>
</body>
</html>
